function dlfs() {
    $(".sjtsdl").hover(function () {
        $(this).children().eq(0).stop().animate({
            "left": "-70px"
        }, 400);
        $(this).children().eq(1).fadeIn(800);
    }, function () {
        $(this).children().eq(0).stop().animate({
            "left": "0px"
        }, 400);
        $(this).children().eq(1).fadeOut(20);
    });



    $(".dlfs-2").click(function () {
        $(".dlewm-1").hide();
        $(".dlewm-2").show();
    });
    $(".dlfs-1").click(function () {
        $(".dlewm-1").show();
        $(".dlewm-2").hide();
    });





    $(".dlewm-2>button").click(function () {
        console.log("aaa")
        $.ajax({
            url: "http://jx.xuzhixiang.top/ap/api/login.php",
            type: "get",
            data: {
                username: $("#username").val(),
                password: $("#password").val(),
            },
            success: function (data) {
                console.log(data);
                if (data.code == 1) {
                    location.href="../list.html";
                    var token = data.data.token;
                    var userid = data.data.id;
                    localStorage.setItem("token",JSON.stringify(token));
                    localStorage.setItem("userid",JSON.stringify(userid));
                    localStorage.setItem("username1", JSON.stringify($("#username").val()))
                    localStorage.setItem("password1", JSON.stringify($("#password").val()))
                } else {
                    alert("请检查用户名或者密码");
                }
            }
        })


    })
}
